package com.atguigu.day08.p5;

/**
 * @version 1.0
 * @Author 马冰
 * @Date 2024/11/8 15:46
 * @注释
 */

public class Person {

    String name;
    int age;
    double salary;
    char gender;
    double height;

    public Person() {
        System.out.println("Person 无参");
    }

    public Person(String name, int age) {
        this.name = name;
        this.age = age;
    }

    public Person(String name, int age, double salary, char gender, double height) {

       /* this. name=name;
        this.age=age;*/
        this(name, age);
        this.salary = salary;
        this.gender = gender;
        this.height = height;


    }

    public void showInfo() {
        System.out.println("名字:" + name + ",年龄:" + age + ",性别:"
                + gender + ",身高:" + height + ",薪资:" + salary);
    }
}

